#!/usr/bin/env node

const fs = require('fs'),
      err = console.error,
      src = process.argv[2],
      mod = process.argv[3];

if(process.argv.length !== 4) {
  err('命令行参数不正确！');
}

try{
  fs.chmodSync(src,mod);//sudo ./15 文件名 664
} catch(e) {
  err(e.message);
}

